define([
        "dojo/_base/declare",
        "dojo/_base/lang",
        "dojo/dom-prop",
        "dijit/_Widget",
        "dijit/_TemplatedMixin",
        "dijit/_WidgetsInTemplateMixin",
        "dojo/text!./templates/clock.html",
    	"dojo/i18n", // i18n.getLocalization
    	"dojo/date/locale",
    	"dojo/i18n!./nls/clock"
], function(declare, lang, dom_prop, _Widget, _TemplatedMixin, _WidgetsInTemplateMixin, template, i18n, locale){
return declare("my_clock.clock", [_Widget, _TemplatedMixin, _WidgetsInTemplateMixin], {
	templateString: template,
	_msgs:null,
	postMixInProperties: function(){
		this.inherited(arguments);
		this._msgs = i18n.getLocalization("my_clock", "clock", this.lang);
	},
	_updateTime:function(){
		dom_prop.set(this.timeNode, "innerHTML", locale.format(new Date(),{
			formatLength:"medium"
		}));
	},
	startup:function(){
		setInterval(lang.hitch(this,"_updateTime"),1000);
	}
});
});